package com.gientech.strategy.demo;

import java.util.HashMap;
import java.util.Map;

public class ActionContext {
    private static Map<String,Object> map=new HashMap<String, Object>();
    static {
        map.put("I",new InsertAction());
        map.put("U",new UpdateAction());
        map.put("Q",new QueryAction());
        map.put("D",new DeleteAction());
    }

    public static Action get(String action){
        return (Action) map.get(action);
    }
}
